package com.example.flowerpcback.resp;

import com.example.flowerpcback.dto.Roles;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.util.Date;
import java.util.List;

public class UserResp {
    private Integer id;

    private String username;

    private String nickname;

    private Integer roleid;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long token;

    private String status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai"  )
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;

    private Long enterpriseid;

    private  List<MenusResp> rolesMenus;

    private  List<MenusResp> rolesBtns;

    public List<MenusResp> getRolesBtns() {
        return rolesBtns;
    }

    public void setRolesBtns(List<MenusResp> rolesBtns) {
        this.rolesBtns = rolesBtns;
    }

    public List<MenusResp> getRolesMenus() {
        return rolesMenus;
    }

    public void setRolesMenus(List<MenusResp> rolesMenus) {
        this.rolesMenus = rolesMenus;
    }

    public Long getEnterpriseid() {
        return enterpriseid;
    }

    public void setEnterpriseid(Long enterpriseid) {
        this.enterpriseid = enterpriseid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    private List<RolesResp> roles;

    public List<RolesResp> getRoles() {
        return roles;
    }

    public void setRoles(List<RolesResp> roles) {
        this.roles = roles;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getRoleid() {
        return roleid;
    }

    public void setRoleid(Integer roleid) {
        this.roleid = roleid;
    }

    public Long getToken() {
        return token;
    }

    public void setToken(Long token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "LoginUserResp{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", nickname='" + nickname + '\'' +
                ", roleid=" + roleid +
                ", token=" + token +
                '}';
    }
}
